package ciyuan.Gui;

import ciyuan.Gui.Screen.PlayerInfoScreen;
import ciyuan.Utils.KeybindingRegisterManager;
import net.minecraft.client.Minecraft;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(value = Dist.CLIENT)
public class ScreenActivator {

    @SubscribeEvent
    public static void onKeyUp(InputEvent.KeyInputEvent event) {
        if (KeybindingRegisterManager.MAIN_MENU.isDown()) {
            Minecraft.getInstance().setScreen(new PlayerInfoScreen());
        }
    }

}
